package com.zzjson.dubbo.consumer;

import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.rpc.Filter;

import java.util.List;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2020 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : 激活扩展点案例 </li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2020年07月01日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class AdaptiveBootStrap {
	public static void main(String[] args) {
		ExtensionLoader<Filter> loader = ExtensionLoader.getExtensionLoader(
				Filter.class);
		URL url = new URL("", "", 0);
		// url=url.addParameter("cache","cache"); 有和没有的区别

		List<Filter> filters = loader.getActivateExtension(url, "cache");

		System.out.println(filters.size());

	}
}